#include <iostream>
using namespace std;

typedef long long LL;

int n;
int cnt;

int main()
{
	cin >> n;

	for (int i = 1; i <= n; i++)
	{
		LL x;	cin >> x;
		if (x & (x - 1))	cnt++;
	}

	cout << n - cnt << endl;

	return 0;
}